﻿
namespace Bettzueche.RLLibrary.Types {
    /// <summary>
    /// 
    /// </summary>
    public class DiscreteState : IState {

        /// <summary>
        /// Gets or sets the ID.
        /// </summary>
        /// <value>
        /// The ID.
        /// </value>
        public virtual int ID { get; set; }


        /// <summary>
        /// Performs an implicit conversion from <see cref="Bettzueche.RLLibrary.Types.DiscreteState"/> to <see cref="System.Int32"/>.
        /// </summary>
        /// <param name="s">The s.</param>
        /// <returns>
        /// The result of the conversion.
        /// </returns>
        public static implicit operator int(DiscreteState s) {
            return s.ID;
        }

        /// <summary>
        /// Performs an implicit conversion from <see cref="System.Int32"/> to <see cref="Bettzueche.RLLibrary.Types.DiscreteState"/>.
        /// </summary>
        /// <param name="i">The i.</param>
        /// <returns>
        /// The result of the conversion.
        /// </returns>
        public static implicit operator DiscreteState(int i) {
            return new DiscreteState { ID = i };
        }
    }
}
